from django.urls import path
from learning.views import LassifysView, LableView, MaterialsView, LearningsView, ContentsView, GreetingsView,CollectView, LikeView
from learning.views import ContentsViewTow, LearningViewTow, MaterialsViewTow
urlpatterns = [
    # 获取所有类别
    path("lassifys/", LassifysView.as_view()),

    # 获取所有标签
    path("lables/",LableView.as_view()),

    # 学习内容
    path("contents/", ContentsView.as_view()),
    path("content/<int:id>", ContentsViewTow.as_view({"get": "ont_content", "put": "upt_content", "delete": "del_content"})),

    # 学习任务learnings
    path("learnings/", LearningsView.as_view()),
    path("learning/<int:id>", LearningViewTow.as_view({"get": "one_learning", "put": "upd_learning", "delete":"del_learning"})),

    # 学习资料materials
    path("materials/",MaterialsView.as_view()),
    path("materila/<int:id>", MaterialsViewTow.as_view({"get": "one_mater", "put": "upd_mater", "delete": "del_mater"})),

    # 问候语
    path("greetings/", GreetingsView.as_view()),

    # 点赞
    path("easylike/", LikeView.as_view()),

    # 收藏
    path("collect/", CollectView.as_view()),


]


























